package com.yang.dto.req;

import com.yang.dao.entity.SkusDO;
import com.yang.dao.entity.SpecsDO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商品新增请求参数
 * 作者：孤城暖阳y
 * 时间：2025-03-11
 */
@Data
@Schema(description = "商品新增请求参数")
public class CommoditySaveReqDTO {

    /**
     * 商品分类ID
     */
    @Schema(description = "商品分类ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "商品分类不能为空")
    private Integer categoryId;

    /**
     * 商品标题
     */
    @Schema(description = "商品名称/标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "商品标题不能为空")
    private String commodityTitle;

    /**
     * 商品封面图URL
     */
    @Schema(description = "商品封面图URL地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "商品封面图不能为空")
    private List<String> imgUrl;

    /**
     * sku的List
     */
    @Schema(description = "商品的sku列表")
    private List<SkusDO> skuList;

    /**
     * 商品规格列表
     */
    @Schema(description = "商品规格列表")
    private List<SpecsDO> newSpecs;
}
